<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="iOS清除代码警告"><meta name="keywords" content="警告"><meta name="author" content="kyren"><meta name="copyright" content="kyren"><title>iOS清除代码警告 | Kyren's Blog</title><link rel="shortcut icon" href="/melody-favicon.ico"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cf87fcdbd9ab7cf93d894f7c219ae78f";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script src="https://v1.hitokoto.cn/?encode=js&amp;charset=utf-8&amp;select=.footer_custom_text" defer></script><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '6.2.0'
} </script><meta name="generator" content="Hexo 6.2.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="true"><div class="toggle-sidebar-info text-center"><span data-toggle="切换文章详情">切换站点概览</span><hr></div><div class="sidebar-toc"><div class="sidebar-toc__title">目录</div><div class="sidebar-toc__progress"><span class="progress-notice">你已经读了</span><span class="progress-num">0</span><span class="progress-percentage">%</span><div class="sidebar-toc__progress-bar"></div></div><div class="sidebar-toc__content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%80%E3%80%81%E5%8E%BB%E8%AD%A6%E5%91%8A%E5%9F%BA%E6%9C%AC%E8%AF%AD%E6%B3%95"><span class="toc-number">1.</span> <span class="toc-text">一、去警告基本语法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BA%8C%E3%80%81%E5%B8%B8%E8%A7%81%E7%BC%96%E8%AF%91%E8%AD%A6%E5%91%8A%E7%B1%BB%E5%9E%8B"><span class="toc-number">2.</span> <span class="toc-text">二、常见编译警告类型</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%89%E3%80%81%E5%8E%BB%E8%AD%A6%E5%91%8A%E5%AE%8F%E5%AE%9A%E4%B9%89"><span class="toc-number">3.</span> <span class="toc-text">三、去警告宏定义</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9B%9B%E3%80%81%E8%8E%B7%E5%8F%96%E8%AD%A6%E5%91%8A%E7%B1%BB%E5%9E%8B"><span class="toc-number">4.</span> <span class="toc-text">四、获取警告类型</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BA%94%E3%80%81%E5%85%B3%E9%97%AD%E5%B7%A5%E7%A8%8B%E4%B8%AD%E6%8C%87%E5%AE%9A%E7%B1%BB%E5%9E%8B%E7%9A%84%E8%AD%A6%E5%91%8A"><span class="toc-number">5.</span> <span class="toc-text">五、关闭工程中指定类型的警告</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%85%AD%E3%80%81%E5%B1%8F%E8%94%BDcocoapod%E5%BC%95%E5%85%A5%E7%9A%84%E7%AC%AC%E4%B8%89%E6%96%B9%E8%AD%A6%E5%91%8A"><span class="toc-number">6.</span> <span class="toc-text">六、屏蔽cocoapod引入的第三方警告</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%83%E3%80%81%E5%B7%A5%E7%A8%8B%E5%B8%B8%E8%A7%81%E8%AD%A6%E5%91%8A"><span class="toc-number">7.</span> <span class="toc-text">七、工程常见警告</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8F%82%E8%80%83%EF%BC%9A"><span class="toc-number">8.</span> <span class="toc-text">参考：</span></a></li></ol></div></div><div class="author-info hide"><div class="author-info__avatar text-center"><img src="https://avatars.githubusercontent.com/u/5827823?v=4"></div><div class="author-info__name text-center">kyren</div><div class="author-info__description text-center">huluo的技术博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://github.com/huluo666">Follow Me</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">239</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">41</span></a><a class="author-info-articles__categories article-meta" href="/categories"><span class="pull-left">分类</span><span class="pull-right">29</span></a></div><hr><div class="author-info-links"><div class="author-info-links__title text-center">Links</div><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:9090/">Jira</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:8090/">Confluence</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://bloc.leniugame.com/">Leniu</a></div></div></div><div id="content-outer"><div class="no-bg" id="top-container"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">Kyren's Blog</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">主页</a><a class="site-page" href="/essay">随笔</a><a class="site-page" href="/archives">归档</a><a class="site-page" href="/tags">标签</a><a class="site-page" href="/categories">分类</a><a class="site-page" href="/about">关于</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="post-info"><div id="post-title">iOS清除代码警告</div><div id="post-meta"><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-02-24</time><span class="post-meta__separator">|</span><i class="fa fa-inbox post-meta__icon" aria-hidden="true"></i><a class="post-meta__categories" href="/categories/iOS/">iOS</a></div></div></div><div class="layout" id="content-inner"><article id="post"><div class="article-container" id="post-content"><p>项目中存在很多黄色感叹号时，首先视觉上就觉得不舒服，并且有些警告可能产生Bug。当有些警告不想看到黄色感叹号时，可以采取一些特殊的手段强制消除警告！</p>
<span id="more"></span>
<h3 id="一、去警告基本语法"><a href="#一、去警告基本语法" class="headerlink" title="一、去警告基本语法"></a>一、去警告基本语法</h3><figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">pragma</span> clang diagnostic push</span></span><br><span class="line"><span class="meta">#<span class="keyword">pragma</span> clang diagnostic ignored <span class="string">&quot;警告名称&quot;</span></span></span><br><span class="line"><span class="comment">//被夹在这中间的代码针对于此警告都会无视并且不显示出来</span></span><br><span class="line"><span class="meta">#<span class="keyword">pragma</span> clang diagnostic pop</span></span><br></pre></td></tr></table></figure>

<p><strong>这段代码的基本流程:</strong></p>
<ol>
<li>push 当前警告入栈</li>
<li>忽略我们要消除的警告</li>
<li>执行会产生警告的代码</li>
<li>pop 警告出栈——恢复之前的状态</li>
</ol>
<p> 例如：</p>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">pragma</span> clang diagnostic push</span></span><br><span class="line"><span class="meta">#<span class="keyword">pragma</span> clang diagnostic ignored <span class="string">&quot;-Wdeprecated-declarations&quot;</span></span></span><br><span class="line">    <span class="keyword">return</span> [<span class="string">@&quot;contentText&quot;</span> sizeWithFont:[<span class="built_in">UIFont</span> systemFontOfSize:<span class="number">14</span>] constrainedToSize:<span class="built_in">CGSizeMake</span>(<span class="number">320</span>, <span class="built_in">CGFLOAT_MAX</span>) lineBreakMode:<span class="number">0</span>];</span><br><span class="line"><span class="meta">#<span class="keyword">pragma</span> clang diagnostic pop</span></span><br></pre></td></tr></table></figure>

<h3 id="二、常见编译警告类型"><a href="#二、常见编译警告类型" class="headerlink" title="二、常见编译警告类型"></a>二、常见编译警告类型</h3><figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">-Wincompatible-pointer-types    指针类型不匹配</span><br><span class="line">-Wincomplete-implementation     没有实现已声明的方法</span><br><span class="line">-Wprotocol                      没有实现协议的方法</span><br><span class="line">-Wimplicit-function-declaration 尚未声明的函数(通常指c函数)</span><br><span class="line">-Warc-performSelector-leaks     使用performSelector可能会出现泄漏(该警告在xcode4<span class="number">.3</span><span class="number">.1</span>中没出现过,网上流传说<span class="number">4.2</span>使用performselector:withObject: 就会得到该警告)</span><br><span class="line">-Wdeprecated-declarations       使用了不推荐使用的方法(如[<span class="built_in">UILabel</span> setFont:(<span class="built_in">UIFont</span>*)])</span><br><span class="line">-Wunused-variable               含有没有被使用的变量</span><br><span class="line">-Wundeclared-selector           未定义selector方法</span><br></pre></td></tr></table></figure>

<p>阅读更多<br>警告类型大全：<a target="_blank" rel="noopener" href="http://fuckingclangwarnings.com/">http://fuckingclangwarnings.com/</a></p>
<h3 id="三、去警告宏定义"><a href="#三、去警告宏定义" class="headerlink" title="三、去警告宏定义"></a>三、去警告宏定义</h3><p>如果需要忽略的警告有很多，可以定义一个宏，简化使用</p>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//忽略PerformSelector警告</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> SUPPRESS_PerformSelectorLeak_WARNING(Stuff) \</span></span><br><span class="line"><span class="meta">do &#123; \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic push&quot;</span>) \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic ignored \&quot;-Warc-performSelector-leaks\&quot;&quot;</span>) \</span></span><br><span class="line"><span class="meta">Stuff; \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic pop&quot;</span>) \</span></span><br><span class="line"><span class="meta">&#125; while (0)</span></span><br><span class="line"></span><br><span class="line"><span class="comment">//忽略未定义方法警告</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span>  SUPPRESS_Undeclaredselector_WARNING(Stuff) \</span></span><br><span class="line"><span class="meta">do &#123; \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic push&quot;</span>) \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic ignored \&quot;-Wundeclared-selector\&quot;&quot;</span>) \</span></span><br><span class="line"><span class="meta">Stuff; \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic pop&quot;</span>) \</span></span><br><span class="line"><span class="meta">&#125; while (0)</span></span><br><span class="line"></span><br><span class="line"><span class="comment">//忽略过期API警告</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> SUPPRESS_DEPRECATED_WARNING(Stuff) \</span></span><br><span class="line"><span class="meta">do &#123; \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic push&quot;</span>) \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic ignored \&quot;-Wdeprecated-declarations\&quot;&quot;</span>) \</span></span><br><span class="line"><span class="meta">Stuff; \</span></span><br><span class="line"><span class="meta">_Pragma(<span class="string">&quot;clang diagnostic pop&quot;</span>) \</span></span><br><span class="line"><span class="meta">&#125; while (0</span></span><br></pre></td></tr></table></figure>
<h3 id="四、获取警告类型"><a href="#四、获取警告类型" class="headerlink" title="四、获取警告类型"></a>四、获取警告类型</h3><p><img src="http://7xr7vj.com1.z0.glb.clouddn.com/findwarning.png" alt="警告"><br>  -W    是前缀,表示打开这种类型的警告，默认开启<br>  -Wno- 关闭某种类型的警告<br>关闭警告如：<code>-Wno-unused-variable</code>、<code>-Wno-shorten-64-to-32</code></p>
<h3 id="五、关闭工程中指定类型的警告"><a href="#五、关闭工程中指定类型的警告" class="headerlink" title="五、关闭工程中指定类型的警告"></a>五、关闭工程中指定类型的警告</h3><p>1、屏蔽项目指定文件指定类型警告<br><code>-Wno-unused-variable</code><br><img src="http://7xr7vj.com1.z0.glb.clouddn.com/2016/03/01/FoS6FJiNkETzlbFkUp0NHPkQm2PY908.png" alt="屏蔽指定文件警告"><br>全部类型<code>-w</code></p>
<p>2、屏蔽工程指定类型警告<br>Taget- buld Setting -other warning Flags -Wno-unused-variable<br><img src="http://7xr7vj.com1.z0.glb.clouddn.com/2016/03/01/FmNscVylZviDEH2QfAsVRhy86DA7298.png" alt="屏蔽工程指定类型警告"></p>
<p>重新编译,文件中的指定类型警告全部消失了!!!!</p>
<h3 id="六、屏蔽cocoapod引入的第三方警告"><a href="#六、屏蔽cocoapod引入的第三方警告" class="headerlink" title="六、屏蔽cocoapod引入的第三方警告"></a>六、屏蔽cocoapod引入的第三方警告</h3><p>对于我们使用cocoapod引入的第三方,我们可以在podfile文件中增加一句<code>inhibit_all_warnings!</code> 来屏蔽pod的工程的任何警告。</p>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta"># platform :ios, &#x27;8.0&#x27;</span></span><br><span class="line"># Uncomment <span class="variable language_">this</span> line <span class="keyword">if</span> you<span class="string">&#x27;re using Swift</span></span><br><span class="line"><span class="string"># use_frameworks!</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">inhibit_all_warnings!</span></span><br><span class="line"><span class="string">target &#x27;</span>RuntimeLearn<span class="string">&#x27; do</span></span><br><span class="line"><span class="string">pod &#x27;</span><span class="built_in">UITextView</span>+Placeholder<span class="string">&#x27;, &#x27;</span>~&gt; <span class="number">1.1</span><span class="number">.1</span><span class="string">&#x27;</span></span><br><span class="line"><span class="string">pod &#x27;</span>MJRefresh<span class="string">&#x27;, &#x27;</span>~&gt; <span class="number">3.1</span><span class="number">.0</span><span class="string">&#x27;</span></span><br><span class="line"><span class="string">#也可以单独设置打开编译警告就好了</span></span><br><span class="line"><span class="string">pod &#x27;</span>Alamofire<span class="string">&#x27;, &#x27;</span>~&gt; <span class="number">3.0</span><span class="number">.0</span>-beta<span class="number">.3</span><span class="string">&#x27;, :inhibit_warnings =&gt; true</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">end</span></span><br></pre></td></tr></table></figure>
<h3 id="七、工程常见警告"><a href="#七、工程常见警告" class="headerlink" title="七、工程常见警告"></a>七、工程常见警告</h3><ol>
<li>苹果app支持arm64以后会有一个问题：NSInteger变成64位了，和原来的int （%d）不匹配，会报如下warning:<br><code>Values of type &#39;NSInteger&#39; should not be used as format arguments;</code><br><code>add an explicit cast to &#39;long&#39; instead</code></li>
</ol>
<p>解决办法：</p>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1</span>、系统推荐方法               [<span class="built_in">NSString</span> stringWithFormat:@“%ld<span class="string">&quot;, (long)number];</span></span><br><span class="line"><span class="string">2、类型强制                  [NSString stringWithFormat:@&quot;</span>%d<span class="string">&quot;, (int)number];</span></span><br><span class="line"><span class="string">3、使用NSNumber类型          [NSString stringWithFormat:@“%@&quot;</span>, @(number)];</span><br><span class="line"><span class="number">4</span>、对应数字是一个size_t的值    [<span class="built_in">NSString</span> stringWithFormat:@“%zd<span class="string">&quot;,number];</span></span><br></pre></td></tr></table></figure>

<p>建议使用第4种方式。<br><code>use %zd for signed, %tu for unsigned, and %tx for hex.</code><br>关于格式化规范:<a target="_blank" rel="noopener" href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html">String Format Specifiers。</a><br><a target="_blank" rel="noopener" href="http://stackoverflow.com/questions/18893880/alternatives-to-type-casting-when-formatting-nsuinteger-on-32-and-64-bit-archi?rq=1">Stackoverflow</a></p>
<pre><code>PS：切记，警告屏蔽只针对于无关紧要的警告，有些警告是代码编写本身有误，可能
引起Bug，需要及时修复。屏蔽掉无关紧要的Bug可以让我们快速找到需要修复的警告，
让工程更整洁，让App更稳定。
</code></pre>
<h3 id="参考："><a href="#参考：" class="headerlink" title="参考："></a>参考：</h3><p><a target="_blank" rel="noopener" href="http://nshipster.cn/clang-diagnostics/">http://nshipster.cn/clang-diagnostics/</a><br><a target="_blank" rel="noopener" href="http://oleb.net/blog/2013/04/compiler-warnings-for-objectivec-developers/">http://oleb.net/blog/2013/04/compiler-warnings-for-objectivec-developers/</a></p>
</div></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">kyren</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://huluo666.gitee.io/2016/02/24/iOS清除代码警告/">http://huluo666.gitee.io/2016/02/24/iOS清除代码警告/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://huluo666.gitee.io">Kyren's Blog</a>！</span></div></div><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E8%AD%A6%E5%91%8A/">警告</a></div><nav id="pagination"><div class="prev-post pull-left"><a href="/2016/02/27/Cocoa%E9%BC%A0%E6%A0%87%E7%9B%91%E6%8E%A7/"><i class="fa fa-chevron-left">  </i><span>macos鼠标监控</span></a></div><div class="next-post pull-right"><a href="/2016/02/19/iOS%E5%B8%B8%E7%94%A8%E7%AC%AC%E4%B8%89%E6%96%B9%E5%BA%93%E5%A4%87%E5%BF%98/"><span>iOS 多环境配置 Build Configuration</span><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer><div class="layout" id="footer"><div class="copyright">&copy;2022 By kyren</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="footer_custom_text">hitokoto</div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_page_pv"><i class="fa fa-file"></i><span id="busuanzi_value_page_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>